package com.qidian.by.goods.service;

import com.qidian.by.goods.vo.ItemVO;
import com.qidian.by.pojo.goods.entity.Item;
import com.qidian.by.util.pojo.EsResult;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 商品表 服务类
 * </p>
 *
 * @author 小可怎么都睡不够
 * @since 2024-05-08
 */
public interface IItemService {
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    EsResult save(ItemVO vo);

    EsResult list(Item item, int page, int limit);

    EsResult addItemAndSpeRelation(Long itemId, List<Long> speId);

    EsResult getSpeIdByItemId(Long itemId);

    @Transactional
    EsResult getItemInfoById(Long itemId);

    EsResult getItemById(Long itemId);
}
